home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / postscript.312 < prev    next >
Text File  |  1992-02-06  |  2KB  |  26 lines

  1. {\rtf0\ansi{\fonttbl\f1\fnil Times-Roman;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f1\b0\i0\ul0\fs28 print alpha postscript\
  7. \
  8. Q:  How do I get an image with alpha (transparency) to print?\
  9. \
  10. A:  There is no device-independent way to print images that are represented with an alpha channel.  And to do it at all requires a fair amount of programming.  So the best solution is to not write programs which use alpha on screen in a way that it would need to be printed.\
  11. \
  12. If you really need to print something with alpha channel, you need to render it into an offscreen (printing store) bitmap at the dpi that it will be printed, then read those bits with the image operator to be printed.  That way the calculations involving alpha will be performed when you render into the printing store bitmap.\
  13. \
  14. Usually this will involve creating a virtual 400 dpi window, do a scale, and then drawSelf:: into that.  Send the resulting bitmap to the printer with the PostScript image operator, after doing a scale back.  There are some issues involved; the 400dpi window will occupy lots of memory for one thing, and it will have 4 gray values which will hopefully correctly print out on a 2 gray printer.\
  15. \
  16. For good results you must use a bitmap at the dpi of the device you are printing on.  The Adobe/NeXT licensing agreement says that you can only print images at resolutions greater than 150dpi on (ONLY on) the NeXT printer.  This allows us to create 92dpi bitmaps in our window server and print them, but not 300 or 400dpi bitmaps (This is on page 6 of the license shipped with 1.0).  Thus, if you want to print with alpha to another printer, the only way to do it is at 92dpi.\
  17. \
  18. When structuring the print methods of your application it would be best to create parallel imaging methods in your drawSelf:: for printing and drawing.  Image the source bitmaps for composite and the basic printing from the same PostScript code and add alpha and composite for on-screen in an intermediate bitmap.\
  19. \
  20. QA312\
  21. \
  22. Valid for 1.0\
  23. Valid for 2.0\
  24. \
  25.  
  26.